﻿@model MISMVC.Web.Models.AccountViewModel

@{
	ViewBag.Title = "Login";
	Layout = null;
}
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>@ViewBag.Title - MIS</title>
	@Styles.Render( "~/Content/css" )
	@Scripts.Render( "~/bundles/modernizr" )
	@Scripts.Render( "~/bundles/jquery" )
	@Scripts.Render( "~/bundles/bootstrap" )
	@Scripts.Render( "~/bundles/jqueryval" )
</head>
<body>
	<div id="wrapper">
		<!-- Navigation bar begin -->
		<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				@Html.ActionLink( "MIS" , "Index" , "Home" , new { area = "" } , new { @class = "navbar-brand" } )
			</div>
		</nav>
		<!-- Navigation bar end -->

			<div class="row">
				<div class="col-md-4 col-md-offset-4">
					<div class="login-panel panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">Please Sign In</h3>
						</div>
						<div class="panel-body">
							@using( Html.BeginForm( ) ) {
								@Html.AntiForgeryToken( )

								@Html.ValidationSummary( true , "" , new { @class = "text-danger" } )
								<fieldset>
									<div class="form-group">
										@Html.EditorFor( model => model.UserName , new { htmlAttributes = new { @class = "form-control" , @placeholder = "User Name" , @autofocus = "autofocus" } } )
										@Html.ValidationMessageFor( model => model.UserName , "" , new { @class = "text-danger" } )
									</div>

									<div class="form-group">
										@Html.EditorFor( model => model.Password , new { htmlAttributes = new { @class = "form-control" , @placeholder = "Password" } } )
										@Html.ValidationMessageFor( model => model.Password , "" , new { @class = "text-danger" } )
									</div>

									<div class="form-group">
										<div class="checkbox">
											<label>Remember Me</label>
											@Html.EditorFor( model => model.RememberMe )
											@Html.ValidationMessageFor( model => model.RememberMe , "" , new { @class = "text-danger" } )
										</div>
									</div>

									<input type="submit" value="Login" class="btn btn-lg btn-success btn-block" />
									@if( ViewBag.Error != null ) {
										<div>
											<label>@ViewBag.Error</label>
										</div>
									}
								</fieldset>
							}
						</div>
					</div>
				</div>
			</div>
	</div>

	<footer>
		@if( DateTime.Now.Year > 2016 ) {
				<p>&copy; 2016 - @DateTime.Now.Year - Manage Information System</p>
		} else {
				<p>&copy; @DateTime.Now.Year - Manage Information System</p>
		}
	</footer>
	</body>
</html>
